package com.sm.healthy.data.bean

import android.os.Parcelable
import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.Index
import androidx.room.PrimaryKey
import com.afollestad.date.year
import com.sm.healthy.ext.getTimeFormat
import kotlinx.android.parcel.IgnoredOnParcel
import kotlinx.android.parcel.Parcelize
import java.util.*

/**
 * @description
 * @author csw
 * @date 2021-05-03
 */
@Parcelize
@Entity(tableName = "bloodPress", indices = [Index(value = ["id"], unique = true)])
data class BloodPressureEntity(
    //序号
    @PrimaryKey(autoGenerate = false) var uid: Long,
    var id: String = Calendar.getInstance().timeInMillis.getTimeFormat("yyyy-MM-dd hh:mm:ss"),
    var systolic: Int = 0,//收缩压
    var diastolic: Int = 0,//舒张压
    var pulseRate: Int = 0,//脉率
    var levelSys: Int = 0,//0正常 1 偏低  2偏高
    var levelDia: Int = 0,//0正常 1 偏低  2偏高
    var levelPul: Int = 0,//0正常 1 偏低  2偏高
    var timeLong: Long = Calendar.getInstance().timeInMillis
) : Parcelable {

}